<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><s:text name="context.title"/></title><%@ include file="/common/meta.jsp"%>
 <script type="text/javascript" src="${ctx}/js/tree-info.js"></script>
</head>
<body>
<h1>目录树管理</h1>
<br/>
<p align="center"><s:actionmessage theme="mytheme" cssClass="actionMessage"/></p>
<s:if test="treeInfos != null && treeInfos.size() != 0">
<table class="table_ys tableColor">
	<tr>
		<th nowrap="nowrap">序号</th>
		<th nowrap="nowrap">标题</th>
		<th nowrap="nowrap">父级分类</th>
		<th nowrap="nowrap">URL</th>
		<th nowrap="nowrap">目标</th>
		<th nowrap="nowrap">权限代码</th>
		<th nowrap="nowrap">操作</th>
	</tr>
	
	<s:iterator value="treeInfos" status="x" var="v">
		<tr <s:if test="(#x.index+1) % 2 == 0">class="tr1"</s:if><s:else>class="tr2"</s:else>>
			<td nowrap="nowrap"><s:property value="#x.index + 1"/></td>
			<td nowrap="nowrap"><s:property value="#v.CAPTION"/></td>
			<td nowrap="nowrap"><s:property value="#v.PANRETCAPTION"/></td>
			<td nowrap="nowrap"><s:property value="#v.NODEURL"/></td>
			<td nowrap="nowrap"><s:property value="#v.TARGET"/></td>
			<td nowrap="nowrap"><s:property value="#v.NAME"/></td>
			<td nowrap="nowrap"><a href="tree-info!edit.action?id=${v.NODEID}">修改</a>、<a href="#" onclick="return delBefore(${v.NODEID})">删除</a></td>
		</tr>
	</s:iterator>
	
</table>

</s:if>


<form id="inputForm" action="tree-info!input.action" method="post">
<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/>添加目录树 </h1>
<fieldset class="fs_ys">
		<legend>添加目录树 </legend>
<table class="table_ys_input">
	<tr>
		<th>类型</th>
		<td><input type="radio" name="isDir" value="2" onclick="hiddenUrl()" />目录 <input type="radio" name="isDir" value="1" onclick="showUrl()" checked="checked"/>链接</td>
	</tr>
	<tr>
		<th>标题</th>
		<td><input type="text" name="streeInfo.caption" class="required"/></td>
	</tr>
	<tr>
		<th>父级分类</th>
		<td><select name="streeInfo.parentid" class="required">
				<option value="">请选择父级目录</option>
				<s:iterator value="treeDir" status="x" var="v">
					<option value="<s:property value="#v.nodeid"/>"><s:property value="#v.caption"/></option>
				</s:iterator>
			</select>
		</td>
	</tr>
	<tr id="url">	
		<th>节点路径</th>
		<td><input type="text" name="streeInfo.nodeurl" class="required"/></td>
	</tr>
	<tr id="auCode">
		<th>权限代码</th>
		<td><input type="text" name="authority.name" class="required" size="18"/><br/>
			分类名：<input type="text" name="authority.supName" class="required"/>
		</td>
	</tr>
</table>
<p align="center"><input type="submit" value=" 提 交 " onclick="return sub()"/>  <input type="reset" value=" 取 消 " /></p>
</fieldset>
<s:token />
</form>
</body>


</html>